home *** CD-ROM | disk | FTP | other *** search
/ PC World 2006 February / PCWorld_2006-02_cd.bin / software / vyzkuste / triky / triky.exe / httrack-3.33.exe / {app} / src / htsdefines.h < prev    next >
C/C++ Source or Header  |  2004-10-05  |  5KB  |  114 lines

  1. /* ------------------------------------------------------------ */
  2. /*
  3. HTTrack Website Copier, Offline Browser for Windows and Unix
  4. Copyright (C) Xavier Roche and other contributors
  5.  
  6. This program is free software; you can redistribute it and/or
  7. modify it under the terms of the GNU General Public License
  8. as published by the Free Software Foundation; either version 2
  9. of the License, or any later version.
  10.  
  11. This program is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. GNU General Public License for more details.
  15.  
  16. You should have received a copy of the GNU General Public License
  17. along with this program; if not, write to the Free Software
  18. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  19.  
  20.  
  21. Important notes:
  22.  
  23. - We hereby ask people using this source NOT to use it in purpose of grabbing
  24. emails addresses, or collecting any other private information on persons.
  25. This would disgrace our work, and spoil the many hours we spent on it.
  26.  
  27.  
  28. Please visit our Website: http://www.httrack.com
  29. */
  30.  
  31.  
  32. /* ------------------------------------------------------------ */
  33. /* File: Some defines for httrack.c and others                  */
  34. /* Author: Xavier Roche                                         */
  35. /* ------------------------------------------------------------ */
  36.  
  37. // Fichier librairie .h
  38. #ifndef HTS_DEFINES_DEFH
  39. #define HTS_DEFINES_DEFH
  40.  
  41. typedef void  (* t_hts_htmlcheck_init)(void);
  42. typedef void  (* t_hts_htmlcheck_uninit)(void);
  43. typedef int   (* t_hts_htmlcheck_start)(httrackp* opt);
  44. typedef int   (* t_hts_htmlcheck_end)(void);
  45. typedef int   (* t_hts_htmlcheck_chopt)(httrackp* opt);
  46. typedef int   (* t_hts_htmlcheck_process)(char** html,int* len,char* url_adresse,char* url_fichier);
  47. typedef int   (* t_hts_htmlcheck)(char* html,int len,char* url_adresse,char* url_fichier);
  48. typedef char* (* t_hts_htmlcheck_query)(char* question);
  49. typedef char* (* t_hts_htmlcheck_query2)(char* question);
  50. typedef char* (* t_hts_htmlcheck_query3)(char* question);
  51. typedef int   (* t_hts_htmlcheck_loop)(lien_back* back,int back_max,int back_index,int lien_tot,int lien_ntot,int stat_time,hts_stat_struct* stats);
  52. typedef int   (* t_hts_htmlcheck_check)(char* adr,char* fil,int status);
  53. typedef void  (* t_hts_htmlcheck_pause)(char* lockfile);
  54. typedef void  (* t_hts_htmlcheck_filesave)(char* file);
  55. typedef int   (* t_hts_htmlcheck_linkdetected)(char* link);
  56. typedef int   (* t_hts_htmlcheck_linkdetected2)(char* link, char* tag_start);
  57. typedef int   (* t_hts_htmlcheck_xfrstatus)(lien_back* back);
  58. typedef int   (* t_hts_htmlcheck_savename)(char* adr_complete,char* fil_complete,char* referer_adr,char* referer_fil,char* save);
  59. typedef int   (* t_hts_htmlcheck_sendhead)(char* buff, char* adr, char* fil, char* referer_adr, char* referer_fil, htsblk* outgoing);
  60. typedef int   (* t_hts_htmlcheck_receivehead)(char* buff, char* adr, char* fil, char* referer_adr, char* referer_fil, htsblk* incoming);
  61.  
  62. /* Library internal definictions */
  63. #ifdef HTS_INTERNAL_BYTECODE
  64. // demande d'interaction avec le shell
  65. #if HTS_ANALYSTE
  66. extern char HTbuff[2048];
  67. extern t_hts_htmlcheck_init       hts_htmlcheck_init;
  68. extern t_hts_htmlcheck_uninit     hts_htmlcheck_uninit;
  69. extern t_hts_htmlcheck_start      hts_htmlcheck_start;
  70. extern t_hts_htmlcheck_end        hts_htmlcheck_end;
  71. extern t_hts_htmlcheck_chopt      hts_htmlcheck_chopt;
  72. extern t_hts_htmlcheck_process    hts_htmlcheck_preprocess;
  73. extern t_hts_htmlcheck_process    hts_htmlcheck_postprocess;
  74. extern t_hts_htmlcheck            hts_htmlcheck;
  75. extern t_hts_htmlcheck_query      hts_htmlcheck_query;
  76. extern t_hts_htmlcheck_query2     hts_htmlcheck_query2;
  77. extern t_hts_htmlcheck_query3     hts_htmlcheck_query3;
  78. extern t_hts_htmlcheck_loop       hts_htmlcheck_loop;
  79. extern t_hts_htmlcheck_check      hts_htmlcheck_check;
  80. extern t_hts_htmlcheck_pause      hts_htmlcheck_pause;
  81. extern t_hts_htmlcheck_filesave   hts_htmlcheck_filesave;
  82. extern t_hts_htmlcheck_linkdetected hts_htmlcheck_linkdetected;
  83. extern t_hts_htmlcheck_linkdetected2 hts_htmlcheck_linkdetected2;
  84. extern t_hts_htmlcheck_xfrstatus  hts_htmlcheck_xfrstatus;
  85. extern t_hts_htmlcheck_savename   hts_htmlcheck_savename;
  86. extern t_hts_htmlcheck_sendhead   hts_htmlcheck_sendhead;
  87. extern t_hts_htmlcheck_receivehead hts_htmlcheck_receivehead;
  88. #endif
  89.  
  90. #if HTS_ANALYSTE
  91. #define HT_PRINT(A) strcatbuff(HTbuff,A);
  92. #define HT_REQUEST_START HTbuff[0]='\0';
  93. #define HT_REQUEST_END 
  94. #define HTT_REQUEST_START HTbuff[0]='\0';
  95. #define HTT_REQUEST_END 
  96. #define HTS_REQUEST_START HTbuff[0]='\0';
  97. #define HTS_REQUEST_END 
  98. #define HTS_PANIC_PRINTF(S) strcpybuff(_hts_errmsg,S);
  99. #else
  100. #define HT_PRINT(A) printf("%s",A);
  101. #define HT_REQUEST_START /*printf("º\n");*/
  102. #define HT_REQUEST_END   /*printf("º\n");*/
  103. #define HTT_REQUEST_START /*if (httrack.shell) printf("º\n");*/
  104. #define HTT_REQUEST_END   /*if (httrack.shell) printf("º\n");*/
  105. #define HTS_REQUEST_START if (opt->shell) { HT_REQUEST_START }
  106. #define HTS_REQUEST_END   if (opt->shell) { HT_REQUEST_END }
  107. #define HTS_PANIC_PRINTF(S) printf("%s\n",S);
  108. #endif
  109.  
  110. #endif
  111.  
  112. #endif
  113.  
  114.